/**
 * @version: V1.0
 * @Title: RadixSort.java
 * @Description:
 * @author wangshipeng
 * @date 2022-01-13 23:40
 * @Copyright: 2022-01-13
 */

package com.peng.sort;

/**
 * @author wangshipeng
 * @ClassName: RadixSort
 * @Description: 基数排序
 * @date 2022-01-13 23:40
 */
public class RadixSort {

    public static void main(String[] args) {
        System.out.println(getDigit(503, 1));
    }

    //获取某一位上的数
    public static int getDigit(int x, int d) {
        return ((x / ((int) Math.pow(10, d - 1))) % 10);
    }
}
